package movie.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.alipay.api.AlipayApiException;

import movie.service.PayService;

import movie.entity.AlipayBean;

@Controller
public class TestController {
	@Autowired
	HttpServletRequest request;
	@RequestMapping(value="/d",method=RequestMethod.POST)
	public String get(Model model)
	{
		String WIDout_trade_no="CQUCS20191998";
		String WIDtotal_amount="20";
		String WIDsubject="CQUCS20190001";
		String WIDbody="测试订单";
		request.setAttribute("WIDout_trade_no", WIDout_trade_no);
		//request.getAttribute("WIDout_trade_no");
		model.addAttribute("WIDout_trade_no", WIDout_trade_no);
		model.addAttribute("WIDtotal_amount", WIDtotal_amount);
		model.addAttribute("WIDsubject", WIDsubject);
		model.addAttribute("WIDbody", WIDbody);
		return "forward:welcome.jsp";
	}
}
